// ****************************************************************************
// *     Filename:  TEvent.h
// *  Description:  ROOT event class
// *      License:	GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
// *       Author:  Tran Hoai Nam (nam), nam@kuno-g.phys.sci.osaka-u.ac.jp
// * Organization:  Osaka University
// *      Created:  2012-09-14 23:52:13
// ****************************************************************************
#ifndef TEVENT_5C88AHBF
#define TEVENT_5C88AHBF

#include "TTrackerHit.h"
#include "TObject.h"
#include "Rtypes.h"
//#include "TString.h"
//#include <string>
//#include <iostream>
#include <vector>
//This event object stores:
//- event id
//- a vector of deposited energies
//- a vector of tracker-type hits
//- a flag for stopped primary particles


class TEvent : public TObject {
	public:
		TEvent ();
		TEvent (int id);
		~TEvent ();

	private:
		unsigned int fEvtId;
		std::vector<double> fEdep;
		bool fPriStoppedFlag;
		std::vector<TTrackerHit> fHit;

	public:
		void Reset();
		void SetEvtId (int value) {fEvtId = value;}
		int GetEvtId() { return fEvtId;}

		//void SetNoOfDets (unsigned char); //should not be used, look at AddEdep
		unsigned int GetNoOfDets() { return  fEdep.size();}
		void SetEdep (double value, int i) {fEdep[i] = value;} //should use AddEdep 
		double GetEdep(int i) { return fEdep.at(i);}
		void AddEdep (double value) {fEdep.push_back(value);}

		void SetPriStoppedFlag() {fPriStoppedFlag = true;}
		bool HasPriStopped() {return fPriStoppedFlag;}

		unsigned int GetNoOfHits() {return fHit.size();}
		void AddHit(TTrackerHit aHit){fHit.push_back(aHit);}
		TTrackerHit GetHit(unsigned int i){return fHit[i];}

		ClassDef(TEvent, 1);
}; // end of class declaration TEvent 

#endif /* end of include guard: TEVENT_5C88AHBF */
